package cn.com.surker.lab.service;

import cn.com.surker.lab.entity.LabExpendUpload;
import cn.com.surker.lab.entity.LabExpendUploadLine;
import cn.com.surker.lab.vo.LabExpendUploadLineVo;
import cn.com.surker.spring.RestResultDto;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 技术上传配合详情表 服务类
 * </p>
 *
 * @author admin
 * @since 2024-09-23
 */
public interface LabExpendUploadLineService extends IService<LabExpendUploadLine> {

	/**
	 * 根据父表id查询数据
	 *
	 * @param uploadId
	 * @return
	 */
	List<LabExpendUploadLine> findByPId(Long uploadId);

	/**
	 * 根据配合比查询信息
	 * @param constructId
	 * @return
	 */
	List<LabExpendUploadLine> findByConstruct(Long constructId);

	/**
	 * 根据任务单id,生产线查询数据详情
	 *
	 * @param indentId 任务单id
	 * @param lineId   生产线id
	 * @return
	 */
	LabExpendUploadLine findByLineId(Long indentId, Long lineId);

	/**
	 * 批量保存上传配合比详情
	 * @param list
	 * @return
	 */
	RestResultDto saveBatchLine(LabExpendUpload expendUpload, List<LabExpendUploadLine> list);


	/**
	 * 查询上传材料信息
	 * @param uploadId
	 * @return
	 */
	List<LabExpendUploadLineVo> findExpendUploadList(Long uploadId);

	/**
	 * 查询是否存在某种材料
	 *
	 * @param orgId
	 * @param type
	 * @param uploadId
	 * @return
	 */
	Integer findExistSn(Long orgId, Integer type, Long uploadId);

	/**
	 * 查询是否存在某种材料用量
	 *
	 * @param orgId
	 * @param type
	 * @param uploadId
	 * @return
	 */
	Integer findExistSnDosage(Long orgId, Integer type, Long uploadId);


}